<?php

session_start();
$TMP_PATH="../../../../";
REQUIRE($TMP_PATH."protect/connect_jeu.php");

$PAGE="<div class=\"G_TITRE_01\">Modification texte de Invention</div>";





//$PAGE.="<script>document.parent.loginform.news_text.value='$tmp_query[3]';</script>";


//$PAGE.="<script>change_news_mod('$ID');</script>" ;


$query="SELECT invention_id, invention_name, invention_descr,invention_desc_compl
FROM invention WHERE invention_id=$ID";

$resultat=mysql_query($query);
$tmp_query=mysql_fetch_array($resultat);

$tmp_query[2]=str_replace("<br>","\n",$tmp_query[2]);
$tmp_query[3]=str_replace("<br>","\n",$tmp_query[3]);


$tmp_query[1]=htmlentities ($tmp_query[1]);
$tmp_query[2]=htmlentities ($tmp_query[2]);
$tmp_query[3]=htmlentities ($tmp_query[3]);


$PAGE.=" <div id=\"ctr\" align=\"center\" whidth=\"250px\">
 <div class=\"MEV\">
 <form name=\"form_invention_mod\"  action=\"javascript:void(0);\" method=\"post\"
  onsubmit=\"
  javascript:ajax('site/test/gestion/invention/invention_modify.php?ID=$ID&invention_desc_rap='+this.batiment_desc_p.value+'&invention_desc_com='+this.batiment_desc_c.value+'&invention_name='+this.batiment_name.value);\">

   <div class=\"inputlabel\">Nom(*)</div><div class=\"inputlabel\"><input name=\"batiment_name\"  id=\"news_titre\" type=\"text\" class=\"inputbox\" size=\"45\" value=\"$tmp_query[1]\"></div>
   <div class=\"inputlabel\">Description rapide(*)</div><div class=\"inputlabel\"><textarea name=\"batiment_desc_p\" class=\"inputbox\" cols=\"51\" rows=\"5\">$tmp_query[2]</textarea></div>
   <div class=\"inputlabel\">Description complete(*)</div><div class=\"inputlabel\"><textarea name=\"batiment_desc_c\" class=\"inputbox\" cols=\"51\" rows=\"5\">$tmp_query[3]</textarea></div>
   <input type=\"hidden\" name=\"batiment_id\" value=\"$ID\">
   <div><input type=\"submit\" name=\"submit\" class=\"button\" value=\"Modifier\"></div>
   
</form></div></div>(*) : Champ obligatoire.";

MYSQL_CLOSE();
echo $PAGE;

?>
